﻿using Layers;
namespace HoldemHook
{
    public class QtWidget : WinWnd
    {
        public QtWidget(WinWnd other)
            : base(other)
        {
       
        }

        protected override void OnCall(object sender, CallEventArgs e)
        {
            base.OnCall(sender, e);
            if (e.Function.StartsWith("QPainter::drawtextItem"))
            {
                MyLogger.WriteLine("!{3}!QPainter::drawTextItem(X={0},Y={1},\'{2}\'", e.Args[1], e.Args[2], e.Args[0],e.InTime);
                OnTextOut((float)(double)e.Args[1], (float)(double)e.Args[2], (string)e.Args[0], e);
            } 
            else if (e.Function.StartsWith("QWidget::getDC"))
            {
                MyLogger.WriteLine("!{1}!QWidget::getDC()={0}", e.Args[0], e.InTime);
            } 
        }
    }
}